package com.lzw.bean;

import com.lzw.common.bean.BaseBean;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


/**
 * 用户pojo对象
 * Created by 林志伟 on 2017/5/11.
 */
public class User  extends BaseBean {
    @NotNull
    @Length(min=3,message = "用户名至少3位")
    private  String name;
    @Length(min = 6,message = "密码至少需要6位")
    private String password;
    private Integer issuper;
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp="^1[34578]\\d{9}$",message = "手机号码格式错误")
    private String mobile;
    @Email
    private String email;
    private String note;
    private Integer status;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }


    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIssuper() {
        return issuper;
    }

    public void setIssuper(Integer issuper) {
        this.issuper = issuper;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", issuper=" + issuper +
                ", mobile='" + mobile + '\'' +
                ", email='" + email + '\'' +
                ", note='" + note + '\'' +
                ", status=" + status +
                "} " + super.toString();
    }
}
